package pixeleditor.ctrl.impl;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.JCheckBox;

import common.ctrl.IObserver;
import common.gui.IViewable;

import pixeleditor.core.Board;

@SuppressWarnings("serial")
public class ChooseDestructibleCtrl extends AbstractAction implements IObserver {
	
	@Override
	public void actionPerformed(ActionEvent e) {
		JCheckBox inDestructible = (JCheckBox) this.getValue("ChooseDestructible.inDestructible");
		Board.getInstance().getPaintSetup().setDestructible(!inDestructible.isSelected());
	}
	
	@Override
	public void addView(IViewable iv) {
	}
}